package com.zhongkeruan.user.configuration;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @author yangyao
 * @Description: 获取数据源
 * @date 2019/1/15 10:48
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    protected Object determineCurrentLookupKey() {
        return DataSourceContextHolder.getDB();
    }
}
